package com.fcy.teamwork.business.main.homepage.adapter

import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.fcy.teamwork.business.main.homepage.MessageFrag
import com.fcy.teamwork.business.main.homepage.MineFrag
import com.fcy.teamwork.business.main.homepage.TaskMarketFrag

class HomePageAdapter(fragmentActivity: AppCompatActivity) :
    FragmentStateAdapter(fragmentActivity) {
    private val source = arrayOf(MessageFrag(), TaskMarketFrag(), MineFrag())
    override fun getItemCount(): Int = source.size

    override fun createFragment(position: Int): Fragment = source[position]

}